<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
    function Book(title, price){
        this.title = title;
        this.price = price;
        this.getPrice = function(){
            return this.title+" 의 가격은 "+this.price;
        };
    }
    
    var book1 = new Book("자바", 10000);
    var book2 = new Book("HTML5", 100);
    
    console.log(book1["title"]+", "+book1["price"]);
    console.log(book1["getPrice"]());
</script>
</head>
<body>

</body>
</html>